package com.club325.voicemicroblog.persist.test;

import java.sql.Timestamp;

import com.club325.voicemicroblog.database.hibernateutil.HibernateUtil;
import com.club325.voicemicroblog.domain.ForbiddenUser;

public class ForbiddenUserEnvironment implements Environment{
	protected ForbiddenUser fuNew;
	protected ForbiddenUser fuOld;
	
	public void setup()
	{
		fuNew = new ForbiddenUser();
		fuOld = new ForbiddenUser();
		fuOld.setEndTime(new Timestamp(System.currentTimeMillis()));
		fuNew.setEndTime(new Timestamp(System.currentTimeMillis() + 1000000));
		fuOld.setUserID(UserEnvironment.TestUserID1);
		fuNew.setUserID(UserEnvironment.TestUserID2);
		HibernateUtil.add(fuOld);
		HibernateUtil.add(fuNew);
	}
	
	public void tearDown()
	{
		HibernateUtil.delete(fuOld);
		HibernateUtil.delete(fuNew);
	}
}
